<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>JFinal Controller renderError案例</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
<style type="text/css">
	a{
	color:#666FFF;
	font-size:18px;
	}
	 a{
		display: block;
	}
	 a:hover{
		font-size:19px;
		color:red;
	}
	a:active{
		color:blue;
	}
	fieldset{
		width:75%;
	}
</style>
  </head>
  
  <body>
   <h2>JFinal Controller renderError案例</h2>
   <hr>
  <fieldset>
  <legend>renderError()</legend>
  <label>JFinal中的一个bug renderError(404,"404error.html") 默认应该404error.html的路径是我们设置的action的viewpath JFinal新版本会修复<br/>
  <a target="_blank" href="http://www.oschina.net/question/374_225384">bug详解</a>
  </label>
   <ol>
   <li><a href="/rendererror/test1" target="_blank">HTTP 404 error 调用[renderError(404);]</a></li>
   <li><a href="/rendererror/test2" target="_blank">HTTP 404 error 调用[renderError(404,"404error.html");]</a></li>
   <li><a href="/rendererror/test3" target="_blank">HTTP 404 error 调用[renderError(404,"/rendererror/404error.html");]</a></li>
   <li><a href="/rendererror/test4" target="_blank">HTTP 404 error 调用[renderError(404,"/WEB-INF/view/rendererror/404error.html");]</a></li>
   <li><a href="/rendererror/test5" target="_blank">HTTP 404 error 调用[renderError(404, new JspRender("404error.html"));]</a></li>
   <li><a href="/rendererror/test6" target="_blank">HTTP 404 error 调用[renderError(404, new JspRender("/WEB-INF/view/rendererror/404error.html"));]</a></li>
   </ol>
  </fieldset>
  <fieldset>
  <legend>render()</legend>
   <ol>
   <li><a href="/rendererror/test7" target="_blank">HTTP 404 error 调用[render("404error.html",404);]</a></li>
   <li><a href="/rendererror/test8" target="_blank">HTTP 404 error 调用[render("/WEB-INF/view/rendererror/404error.html",404);]</a></li>
   </ol>
  </fieldset>
  <fieldset>
  <legend>HTTP 404 403 500 501....</legend>
   <ol>
   <li><a href="/rendererror/test1" target="_blank">HTTP 404 error 调用[renderError(404);]</a></li>
   <li><a href="/rendererror/test9" target="_blank">HTTP 400 error 调用[renderError(400);]</a></li>
   <li><a href="/rendererror/test10" target="_blank">HTTP 401 error 调用[renderError(401);]</a></li>
   <li><a href="/rendererror/test11" target="_blank">HTTP 403 error 调用[renderError(403);]</a></li>
   <li><a href="/rendererror/test12" target="_blank">HTTP 500 error 调用[renderError(500);]</a></li>
   </ol>
  </fieldset>
  </body>
</html>
